import time

def calcu_time(func):
    def f():
        start = time.time()
        func()
        end = time.time()
        spend = (end - start)
        print("time:{} s".format(spend))
    return f

def sum(max):
    if max <= 100 and max >= 0:
        return max + sum(int(max)-1)
    else:
        return 0

@calcu_time
def sum_0_to_100():
    num = sum(100)
    print(num)
    return num

sum_0_to_100()
